package com.dimaidt.girl.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author : Alex Hu
 * date : 2020/2/25 下午22:30
 * description :
 */
@Controller
@RequestMapping("/hello")
public class HtmlController {
    @GetMapping("/index")
    public String say() {
        /**
         * 注意不需要后缀 .html
         */
        return "index";
    }

    @Value("${girl.cupSize}")
    private String cupSize;

    @GetMapping("/index3")
    public String say(Model model) {
        /**注入标签值*/
        model.addAttribute("cupSize", cupSize);

        return "index3";
    }
}
